[PROF-10124] Lower value used to clamp very high allocation profiling weights #3793
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR lowers the profiling internal constant
MAX_ALLOC_WEIGHT
from 65535 to 10000.This value is used when clamping very high allocation profiling weights.
Aka: Each allocation sample taken by the profiler has a weight assigned to it; this weight is clamped (e.g. limited to) this maximum value. The remaining weight is assigned to a separate "skipped samples" placeholder (see #3792).
Motivation:
Very large weights on samples can produce biased results; by lowering the maximum we reduce the maximum bias that can ever be introduced.
Additional Notes:
I've gathered data from a number of apps when choosing this value, see https://docs.google.com/document/d/1lWLB714wlLBBq6T4xZyAc4a5wtWhSmr4-hgiPKeErlA/edit for details (Datadog-only link, sorry!).
How to test the change?
The tests for #3792 also cover this change (although the changes are otherwise independent).